
<template>
  <div>
    <div>
      <el-row :gutter="20">
        <el-col :span="6"><div class="grid-content bg-purple">总注册人数</div></el-col>
        <el-col :span="6"><div class="grid-content bg-purple">今日注册人数</div></el-col>
        <el-col :span="6"><div class="grid-content bg-purple">总充值</div></el-col>
        <el-col :span="6"><div class="grid-content bg-purple">今日充值</div></el-col>
      </el-row>
    </div>
    <br />
    <div>
      <el-row :gutter="20">
        <el-col :span="6"><div class="grid-content bg-purple">{{count.userNum}}</div></el-col>
        <el-col :span="6"><div class="grid-content bg-purple">{{count.todayAddUserNum}}</div></el-col>
        <el-col :span="6"><div class="grid-content bg-purple">{{count.totalRecharge}}</div></el-col>
        <el-col :span="6"><div class="grid-content bg-purple">{{count.todayRecharge}}</div></el-col>
      </el-row>
    </div>
    <br />
    <div>
      <el-row :gutter="20">
        <el-col :span="6"><div class="grid-content bg-purple">总提现</div></el-col>
        <el-col :span="6"><div class="grid-content bg-purple">今日提现</div></el-col>
        <el-col :span="6"><div class="grid-content bg-purple">总积分</div></el-col>
        <el-col :span="6"><div class="grid-content bg-purple">总u积分</div></el-col>
      </el-row>
    </div>
    <br />
    <div>
      <el-row :gutter="20">
        <el-col :span="6"><div class="grid-content bg-purple">{{count.totalWithdraw}}</div></el-col>
        <el-col :span="6"><div class="grid-content bg-purple">{{count.todayWithdraw}}</div></el-col>
        <el-col :span="6"><div class="grid-content bg-purple">{{count.totalIntegral}}</div></el-col>
        <el-col :span="6"><div class="grid-content bg-purple">{{count.totalUIntegral}}</div></el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      count:{}
    };
  },
  created() {
    this.getCount();
  },
  methods: {
    getCount(){
      this.$http
        .post("/manage/conf/count", {})
        .then((res) => {
          this.count=res.data.data;
        });
    },
    getDetailsInfo(scope) {
      console.log(scope);
      this.$http
        .post("/manage/userCoin/editNorml", { queryId: scope.row.id })
        .then((res) => {
          console.log(res.data);
          if (res.data.status == 1) {
            this.getZdList();
            this.$message({
              message: "已恢复正常",
              type: "success",
            });
          } else {
            this.$message.error(res.data.message);
          }
        });
    },
    getZdList() {
      this.$http.post("/manage/userCoin/sysAddBill", {}).then((res) => {
        console.log(res.data);
        if (res.data.status == 1) {
          this.zdList = res.data.data;
        } else {
          this.$message.error(res.data.message);
        }
      });
    },
    getTJdata() {
      this.$http.post("/manage/userCoin/sysCount", {}).then((res) => {
        console.log(res.data);
        if (res.data.status == 1) {
          this.dataInfo = res.data.data;
          this.treeList = res.data.data.treeCount;
        } else {
          this.$message.error(res.data.message);
        }
      });
    },
    assetsRank() {
      this.$http.post("/manage/userCoin/top100", this.params).then((res) => {
        console.log(res.data);
        if (res.data.status == 1) {
          this.rankList = res.data.data;
        } else {
          this.$message.error(res.data.message);
        }
      });
    },
    changeSelect(e) {
      console.log(e);
      this.params.queryType = e;
      this.valueData = this.options[e].label;
      this.assetsRank();
    },
  },
};
</script>

<style scoped lang="less">
.data-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
}
.list-wrap {
  display: flex;
  align-items: center;
}
      .el-row {
        margin-bottom: 20px;
        &:last-child {
          margin-bottom: 0;
        }
      }
      .el-col {
        border-radius: 4px;
      }
      .bg-purple-dark {
        background: #99a9bf;
      }
      .bg-purple {
        background: #d3dce6;
      }
      .bg-purple-light {
        background: #e5e9f2;
      }
      .grid-content {
        border-radius: 4px;
        min-height: 36px;
        text-align: center;
        padding-top: 10px;
      }
      .row-bg {
        padding: 10px 0;
        background-color: #f9fafc;
      }
    </style>
